﻿Public Class Logout
    Inherits System.Web.UI.Page

    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load

        Dim deleteCookie As HttpCookie
        Dim cookieId As String
        Dim j As Integer
        Dim numberOfCookies As Integer = Request.Cookies.Count - 1
        For j = 0 To numberOfCookies
            cookieId = Request.Cookies(j).Name
            deleteCookie = New HttpCookie(cookieId)
            deleteCookie.Expires = DateTime.Now.AddDays(-5)
            Response.Cookies.Add(deleteCookie)
        Next

        FormsAuthentication.SignOut()
        Response.Clear()
        Response.Redirect("Login.aspx")



    End Sub

End Class